import React, { Component } from 'react'
import Item from '../Item/Item'

export default class List extends Component {
  render() {
    const {todos,changeItem,deleteItem } = this.props
    return (
      <div>
        {
            todos.map((todo)=>{
                return <Item key={todo.id} {...todo} changeItem={changeItem} deleteItem={deleteItem}/>
            })
        }
      </div>
    )
  }
}
